package com.woniu.service.impl;

import com.woniu.adapter.WarehouseAdapter;
import com.woniu.outlet.po.WarehousePo;
import com.woniu.service.WarehouseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class WarehouseServiceImpl implements WarehouseService {

    @Autowired
    private WarehouseAdapter warehouseAdapter;

    @Override
    public List<WarehousePo> findWarehouses() throws Exception {
        List<WarehousePo> warehousePos = warehouseAdapter.findWarehouses();
        return warehousePos;
    }

    @Override
    public WarehousePo getWarehouseById(Long id) throws Exception {
        return warehouseAdapter.getWarehouseById(id);
    }
}
